package com.example.springbootv1.controller;

import com.example.springbootv1.service.GradeService;
import com.example.springbootv1.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/grade")
@CrossOrigin(origins = "*")
public class GradeController {
    @Autowired
    private GradeService gradeService;

    @GetMapping("/getList")
    public Result getGradeAndStudentList() {
        return Result.success(gradeService.getGradeAndStudentList());
    }
}
